package org.shiwen.week6.thursday;

public class Student {
    private String name;
    private int age;
    private String school;
    private String major;

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
    //alt+insert
    //alt键是键盘最后一行从左往右数第三个
    //insert键是方向键左键上面两个按键

    //一些额外的快捷键psvm+tab可以快速的生成 public static void main(String[] args)
    //sout 可以快速的生成System.out.println
    //有的时候排版很乱 可以用alt+ctrl+l来实现排版
    //fori+tab 可以快速生成for循环
    //选中某一行或者多行ctrl+/可以快速变为标注或者取消
//    public student(String name, int age, String school) {
//        this.name = name;
//        this.age = age;
//        this.school = school;
//    }
    //因为构造方法名和类名不一致导致报错
    public Student(String name, int age, String school) {
        this.name = name;
        this.age = age;
        this.school = school;
    }

    public Student(String name, int age, String school, String major) {
        this.name = name;
        this.age = age;
        this.school = school;
        this.major = major;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public void show() {
        System.out.println("姓名：" + name + "，年龄：" + age + "，学校：" + school + "，年级：" + major);
    }
}
